package switch_test

import "fmt"

func SwitchDemo()  {

	i := 2

	switch i {
	case 1:
		fmt.Print("1")
	case 2:
		fmt.Print("2")
		fallthrough // go 默认不用写break， 想往下继续执行，需要fallthrough
	case 3:
		fmt.Print("3")
	default:
		fmt.Print("default")

	}
}